Magnetic hard disk drives (HDDs) have been employed in information technology as a low-cost means for providing random access to large quantities of data. Consequently, as digital technologies have greatly expanded the need for data storage in all aspects of modern life, areal density of information stored in HDDs has been continuously increased. However, there is a physical limitation for the minimum width of a write head when using conventional data recording techniques, such as perpendicular magnetic recording (PMR). This minimum width has prevented further decreases in written track width and areal density of HDDs, even though the width of a read head can be further reduced.
A recently developed technology that has further increased the areal density of magnetic HDDs is shingled magnetic recording (SMR). In an HDD that employs SMR, adjacent data tracks on a magnetic disk are each written (one group at a time) so as to overlap, and therefore overwrite, a portion of the previously written data track. As a result, the data tracks written in an SMR HDD are compressed in width to allow for increased data density in an HDD.
In addition to increased areal density, however, SMR HDDs have a significant drawback. Once a data track is written in a shingled structure, that data track cannot be updated in place because that would overwrite and destroy data in one or more adjacent and overlapping data tracks. That is, random block overwrites cannot be performed on shingled data tracks without disturbing existing data. To avoid re-writing an entire group, or “band” of shingled data tracks each time a host requests an overwrite of data within that group of tracks, data associated with write requests are commonly stored in a so-called “media cache.” Typically, the media cache is located in a non-SMR region of the HDD, thereby allowing random block writes to the HDD. Such data stored in the media cache can be later written into the appropriate band in the SMR region of the HDD, along with other write data associated with that particular band. Therefore, as long as the media cache for an SMR HDD is not full, write performance of an SMR HDD can meet or exceed that of a conventional HDD.
However, once the media cache of an SMR HDD is filled, random write performance for the drive can be dramatically reduced, due to the resulting very high write amplification. Specifically, with the media cache no longer available, the SMR HDD can only receive additional write data by either writing the additional write data directly to the appropriate band in the main SMR region of the HDD, or flushing some or all of the media cache to the main SMR region of the HDD to make space available in the media cache for the additional write data. In either case, each SMR band that is refreshed (via a read-modify-write operation) is generally updated with a small amount of new data, even though the entire SMR band must be read and re-written. Thus, each refreshed SMR band is read, modified with a small number of new entries, and re-written, which results in severe write amplification. For example, when a 256 MB SMR band is read (via 64,000 4 KB read operations), modified with thirty 4 KB data blocks, and re-written (via 64,000 4 KB write operations), over 128,000 4 KB read and/or write operations are performed just to complete the thirty 4 KB write operations. Such high write amplification limits the sustained random write performance of an SMR HDD that employs a media cache as described.
As a result, a media cache that includes one or more intermediate cache levels has been introduced in some SMR HDDs, which can reduce significantly the above-described write-amplification. In such a multi-level media cache scheme, randomly received and arranged write data that are stored in a first level media cache are sorted by LBA and flushed to different second level media caches, where each second level cache is dedicated to storing data for a unique portion of the LBA space of the SMR HDD. In each second level cache, data flushed from the first level media cache are stored in monotonically increasing LBA order. Thus, when a second level cache fills and is flushed to the main disk (or to an additional media cache layer), the flushed data are not written to randomly located SMR bands on the main disk, but are instead written as ordered writes to a much smaller number of SMR bands. Consequently, a multi-level cache in an SMR HDD can greatly reduce the write amplification associated with flushing media cache.
Unfortunately, one trade-off associated with improving write performance of an SMR HDD via a multi-level media cache is that read performance generally suffers. This is because the location of data for any particular LBA included in a read command is difficult to track. For example, when a read command referencing a particular LBA is received by an SMR HDD with a three-level media cache, the data for that LBA may be stored in the main disk or in any of the three different levels of media cache. As a result, to complete a single read operation, the drive may have to seek to as many as four different locations on the disk to determine the actual location of data for the LBA. Thus, while employing a multi-level media cache in an SMR HDD can improve the write performance of the drive, the multi-level media cache can also cause read performance of the drive to suffer.